<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>授信黑名单 详情</title>
<jsp:include page="../../import.jsp" flush="true"/>
</head>
<body>
        <form id="mcrCstCreditBl_form">
           <div class="fieldset1 tabel_col tabel_col_s clearFix noBorder">
                <div class="fieldBox col_50">
                    <div class="label">用户ID</div>
                    <div class="field">
                  		<span id="usrId" name="usrId"></span>
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label">车辆ID</div>
                    <div class="field">
                        <span id="carId" name="carId"></span>
                    </div>
                </div>
                <div class="fieldBox col_50">
                    <div class="label">原因</div>
                    <div class="field">
                        <span id="reason" name="reason"></span>
                    </div>
                </div>
                <!-- hide data -->
		        <div class="fieldBox col_100" style="display:none;">
		          <div class="field">
		              <input name="dataId" id="dataId" type="text" class="ui-textbox" value="${id}">
		          </div>
		        </div>
            </div>
        </form>
	<script>
		$(function() {
		   $("#mcrCstCreditBl_form").ligerForm({
                validate: true
           });
	        
	       initData();
		});
		
		//父级窗口会调用取消
		frameElement.dialog.onCancel = function () {
			frameElement.dialog.close();
		}
		
		function initData(){
			var dataId = $("#dataId").val();
	    	if(StringUtils.isEmpty(dataId))return;
	    	var _url = '<%=path%>/mcr/mcrCstCreditBl/getById.do';
	    	AjaxUtils.ajaxGet(_url, {id:dataId}, initCallback);
    	}
		
		//新增回调
		function initCallback(msg){
			if(msg.success == 1){
				 setData(msg.data);//设置数据
			 }else{
				 UIUtils.alertError(msg.info);
			 }
		}
		
		//设置页面数据
	    function setData(data){
	    	$("#usrId").html(data.usrId);
	    	$("#carId").html(data.carId);
	    	$("#reason").html(data.reason);
		};
	</script>
</body>
</html>